# This file is part of MXE.
# See index.html for further information.

PKG             := shntool
$(PKG)_IGNORE   :=
$(PKG)_CHECKSUM := 7a2bc8801e180cf582f0e39775603582e35d50d2
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := http://etree.org/shnutils/shntool/dist/src/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc sox flac mac

define $(PKG)_UPDATE
    wget -q -O- 'http://etree.org/shnutils/shntool/dist/src/' | \
    grep 'shntool-' | \
    $(SED) -n 's,.*shntool-\([0-9][^>]*\)\.tar.*,\1,p' | \
    tail -1
endef

define $(PKG)_BUILD
    cd '$(1)' && ./configure \
        --host='$(TARGET)' \
        --prefix='$(PREFIX)/$(TARGET)' \
        --disable-shared
    $(MAKE) -C '$(1)' -j '$(JOBS)'
    $(MAKE) -C '$(1)' -j 1 install
endef
